% http://tex.stackexchange.com/questions/89574/language-option-supported-in-listings
% słowa kluczowe z https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Reserved_Words?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FReserved_Words
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\lstdefinelanguage{JavaScript}{
  keywords={typeof, new, true, false, catch, function, return, null, catch, switch, var, if, in, while, do, else, case, break},
  ndkeywords={class, export, boolean, throw, implements, import, this},
  sensitive=false,
  comment=[l]{//},
  morecomment=[s]{/*}{*/},
  morestring=[b]',
  morestring=[b]"
}
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\lstdefinelanguage{JSdef}{
  keywords={break, case, catch, continue, debugger, default, delete, do, else, false, finally, for, function, if, in, instanceof, new, null, return, switch, true, this, throw, try, typeof, var, void, while, with},
  ndkeywords={class, export, enum, boolean, implements, import},
  sensitive=false,
  comment=[l]{//},
  morecomment=[s]{/*}{*/},
  morestring=[b]',
  morestring=[b]"
}